package com.lucy.nepu.system.period;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.lucy.common.core.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * @author kindear
 * 绩效考核周期
 */
@Getter
@Setter
@ToString
@RequiredArgsConstructor
@Entity
@Table(name = "nepu_period")
@ApiModel(value = "考核周期")
public class Period implements Serializable {

    @Id
    @Column(name = "id")
    @ApiModelProperty(value = "周期唯一ID")
    String id;

    @Column(name = "period_name")
    @ApiModelProperty(value = "周期名称",notes = "例如:2021-2022 第一学期")
    String periodName;

    @ApiModelProperty(value = "父周期ID")
    @Column(name = "parent_id")
    String parentId;

    @ApiModelProperty(value = "周期类型",notes = "现在分配教学周期和科研周期")
    @Column(name = "period_type")
    String periodType;

    @ApiModelProperty("开始日期")
    @Column(name = "start_date")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    Date startDate;

    @ApiModelProperty("结束日期")
    @Column(name = "end_date")
    @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8")
    Date endDate;
}
